package com.tpo.jnotes.client.main;

import javax.swing.JFrame;

import com.tpo.jnotes.base.colors.schema.BCSSManager;
import com.tpo.jnotes.base.colors.schema.BGreyCSS;
import com.tpo.jnotes.client.layer.controller.NotesController;
import com.tpo.jnotes.client.layer.model.NModel;
import com.tpo.jnotes.client.layer.view.NView;

public final class Main extends BaseMain implements Runnable
{

    private static Main instance;
    private final long startTime = System.currentTimeMillis();

    public static void main( String[] args )
    {
        instance = new Main();
        instance.run();
    }

    public static JFrame getMainApplication()
    {
        return instance;
    }

    @Override
    public void run()
    {
        Logging.trace( "Main > Set current schema" );
        BCSSManager.setCurrentCSS( new BGreyCSS() );
        new NotesController( new NView(), new NModel() );
        Logging.trace( "Main > Loading took " + (System.currentTimeMillis() - startTime) + " ms" );
    }

}